package com.example.spark.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @TableId
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    private String username;
    private String password;
    private String realName;
    @TableField(value = "class")
    private String classes;
    private String grade;
    private String profession;
    private String college;
    private String phone;
    private String email;
    private String blog;
    private String photo;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long directionId;
    private Integer isAdmin;
    private Integer isMapper;
    //逻辑删除:0表示未删除,1表示删除
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @TableField(exist = false, select = false)
    private String direction;

    @TableField(exist = false, select = false)
    private String directionPhoto;


}
